<!--
 * @Author: wangjian
 * 656876071@qq.com
 * @Date: 2024-10-09 15:27:44
 * @LastEditTime: 2024-10-09 16:44:06
 * @FilePath: public/preview.html
 * @Description: 
 -->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width,height=device-height, user-scalable=no,initial-scale=1, minimum-scale=1, maximum-scale=1,target-densitydpi=device-dpi ">
    <link rel="stylesheet" href="../node_modules/img-previewer/dist/index.css">
    <script src="https://cdn.jsdelivr.net/npm/img-previewer@2.1.6/dist/img-previewer.min.js"></script>
    <title>界面预览</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        body{
            background-color: white;
        }
        .editor-content-view {
            /*不需要border*/
            /*border: 3px solid #ccc;*/
            /*border-radius: 5px;*/
            padding: 0 10px;
            margin-top: 20px;
            overflow-x: auto;
        }

        .editor-content-view a {
            color: #0269c8;
            cursor: pointer;
        }

        .editor-content-view p,
        .editor-content-view li {
            white-space: pre-wrap; /* 保留空格 */
            margin: 15px 0;
        }

        .editor-content-view p {
            line-height: 1.5;
        }

        .editor-content-view blockquote {
            border-left: 8px solid #d0e5f2;
            padding: 10px 10px;
            margin: 15px 0;
            background-color: #f1f1f1;
        }

        /*.editor-content-view code {*/
        /*  font-family: monospace;*/
        /*  background-color: #eee;*/
        /*  padding: 3px;*/
        /*  border-radius: 3px;*/
        /*}*/
        /*.editor-content-view pre>code {*/
        /*  display: block;*/
        /*  padding: 10px;*/
        /*}*/

        .editor-content-view table {
            border-collapse: collapse;
            margin: 15px 0;
        }

        .editor-content-view td,
        .editor-content-view th {
            border: 1px solid #ccc;
            min-width: 50px;
            height: 20px;
        }

        .editor-content-view th {
            background-color: #f1f1f1;
        }

        .editor-content-view ul,
        .editor-content-view ol {
            padding-left: 20px;
        }

        .editor-content-view ul {
            list-style: disc
        }


        .editor-content-view ol {
            list-style: decimal;
        }

        .editor-content-view input[type="checkbox"] {
            margin-right: 5px;
        }
    </style>
</head>
<body>
    <div id="app" class="editor-content-view"></div>
</body>

<script>
    function write(innerHtml){
        document.getElementById('app').innerHTML = innerHtml;
        previewer.update()
    }
    const previewer = new ImgPreviewer('#app', {})
</script>
</html>